import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi";

// 查询货位资料列表
export function listLocation(query) {
    return request({
        url: '/wms/location/list',
        method: 'get',
        params: query
    })
}

// 查询货位资料详细
export function getLocation(locationId) {
    return request({
        url: '/wms/location/' + parseStrEmpty(locationId),
        method: 'get'
    })
}

// 新增货位资料
export function addLocation(data) {
    return request({
        url: '/wms/location',
        method: 'post',
        data: data
    })
}

// 修改货位资料
export function updateLocation(data) {
    return request({
        url: '/wms/location',
        method: 'put',
        data: data
    })
}

// 删除货位资料
export function delLocation(locationId) {
    return request({
        url: '/wms/location/' + locationId,
        method: 'delete'
    })
}
